package es.project.sien7e.main.services;

import javax.jdo.PersistenceManager;
import javax.validation.Valid;

import org.springframework.stereotype.Service;

import es.project.sien7e.main.PMF;
import es.project.sien7e.main.model.Contador;

@Service
public class ContadorServiceImpl implements ContadorService {

	@Override
	public Contador insertaContador(@Valid Contador obj) {
		PersistenceManager pm = PMF.get().getPersistenceManager();
		Contador obj2 = null;
		try {
			obj2 = pm.makePersistent(obj);
		} finally {
			pm.close();
		}
		return obj2;
	}
}
